Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client implementation #1

Merged
merged 29 commits into from
Jan 8, 2025
Merged

Conversation

gianbelinche
Copy link
Contributor

This PR moves the client implementation coming from zksync-era.
It has some changes to make it work as a lib:

  • Changed zksync configs and secrets for new ones.
  • Changed zksync ethereum client for a new one.

Copy link
Collaborator

@samlaf samlaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for upstreaming :) Huge PR though, will need to make a few passes. Here's a first round of comments

Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
src/generated/disperser.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
Comment on lines +63 to +70
impl From<DisperserG1Commitment> for G1Commitment {
fn from(value: DisperserG1Commitment) -> Self {
Self {
x: value.x,
y: value.y,
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any point in redefining G1Commitment here? Its literally the same struct as the one in generated/common.rs. Perhaps we can just use that one directly?

src/config.rs Show resolved Hide resolved
src/config.rs Outdated Show resolved Hide resolved
src/config.rs Outdated Show resolved Hide resolved
src/config.rs Outdated Show resolved Hide resolved
src/verifier.rs Outdated Show resolved Hide resolved
@juanbono
Copy link
Collaborator

juanbono commented Jan 3, 2025

hey @samlaf this is ready for review again, we merged the previous PRs (the one about thiserror and the other one that synced the latest changes). Let me know if you have any questions.

Copy link
Collaborator

@samlaf samlaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juanbono @gianbelinche are you guys ready to start using this client in zksync after we merge this PR? If so then I don't want to delay this merge any longer. I can just create separate issues for the points raised below that we can fix in separate PRs.

src/lib.rs Outdated Show resolved Hide resolved
src/eth_client.rs Outdated Show resolved Hide resolved
src/eth_client.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how were these generated? can we use a submodule to eigenda + prost to generate these?

src/sdk.rs Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a huge fan of the module name sdk.
What is the reason why client and RawEigenClient need to be separate? Most of the methods in RawEigenClient are private anyways right? So could we not just merge the two?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can address that one in a separate PR after we merge this initial implementation

@samlaf samlaf merged commit 1a5c6eb into Layr-Labs:master Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants